package com.sunjob.mroresource.mapper;

import com.sunjob.common.domain.resource.*;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author: TomHuang
 * @date: 2022/8/18 16:49
 */

@Mapper
@Repository
public interface AccessoryMapper {

    //查询所有配件
    List<Accessory> queryAllAccessory();

    //根据配件ID（accessory_id）查找，返回配件实体
    Accessory queryAccessoryById(Long accessoryId);

    //根据配件名称（accessory_name）模糊查找，返回配件实体集合
    List<Accessory> queryAccessoryByName(String accessoryName);

    //查询所有员工数量
    int queryAccessoryCount();

    //添加配件
    int insertAccessory(Accessory accessory);

    //添加配件类型
    int insertAccessorySpecies(AccessorySpecies accessorySpecies);

    //根据配件类型Id查询配件
    String queryAccessorySpecies(Long accessoryId);

    //查询所有配件类型
    List<String> queryAllAccessorySpecies();

    //添加配件状态
    int insertAccessoryStatus(AccessoryStatus accessoryStatus);

    //根据配件Id查询配件状态
    int queryAccessoryStatus(Long accessoryId);

    //查询所有配件状态
    List<Integer> queryAllAccessoryStatus();

    //添加配件供货商管理
    int insertAccessorySupplier(AccessorySupplier accessorySupplier);

    //根据配件Id查询配件供货商
    String queryAccessorySupplier(Long accessoryId);

    //查询所有配件供货商
    List<String> queryAllAccessorySupplier();

    //添加配件技术要求
    int insertAccessoryTech(AccessoryTech accessoryTech);

    //根据配件Id查询配件技术要求
    String queryAccessoryTech(Long accessoryId);

    //查询所有配件技术要求
    List<String> queryAllAccessoryTech();

    //修改配件信息
    int updateAccessory(Accessory accessory);

    //修改配件种类表信息
    int updateAccessorySpecies(AccessorySpecies accessorySpecies);

    //修改供货商管理表信息
    int updateAccessorySupplier(AccessorySupplier accessorySupplier);

    //修改技术要求表信息
    int updateAccessoryTech(AccessoryTech accessoryTech);

    //查看配件的适用车型
    String queryAccessoryVehicleType(Long accessoryId);

    //查看配件所属专业系统
    String queryAccessorySystem(Long accessoryId);

    //根据配件Id查看所有出入库记录，返回集合
    List<Inorout> queryInoroutByAccessoryId(Long accessoryId);

    //添加配件出入库记录
    int insertAccessoryInorout(Inorout inorout);

    //修改配件数量
    int updateAccessoryCount(Long accessoryId,int count);








}
